package com.woniu.form;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import javax.validation.constraints.Size;
import java.math.BigDecimal;

@Data
@ApiModel(description = "修改店铺菜品表单")
public class UpdateStoreProductForm {
    @NotNull(message = "菜品id不能为空")
    @Positive(message = "菜品id必须为正整数")
    @ApiModelProperty(value = "菜品id")
    private Long storeProductId;
    @Size(max = 20,message = "菜品名称长度不能超过20")
    @ApiModelProperty(value = "菜品名称")
    private String productName;
    @Size(max = 50,message = "菜品介绍长度不能超过50")
    @ApiModelProperty(value = "菜品介绍")
    private String productIntr;
    @Positive(message = "菜品类型id必须为正整数")
    @ApiModelProperty(value = "菜品类型id")
    private Long foodTypeId;
    @Positive(message = "菜品价格必须为正数")
    @ApiModelProperty(value = "菜品价格")
    @DecimalMax(value = "10000", message = "菜品价格不能超过10000")
    private BigDecimal price;
}
